<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
<div class="content_container">
    <div id="forget_password">
        <?php echo form_open('login/submitForgetPassword'); ?>
        <div id="form_fp">
            <div id="form_fp_title">Please insert your e-mail and username. <br/> A new password will be sent to your e-mail</div>
            <div class="form_fp_row">
                <div id="form_fp_email_label">E-mail : </div>
                <div id="form_fp_email_input"><?php echo form_input($email) ?></div>
            </div>
            <div class="form_fp_row">
                <div id="form_fp_email_label">
                    Username : 
                </div>
                <div id="form_fp_username_input">
                    <?php echo form_input($username) ?></div>
                </div>
            <?php echo form_submit("sendpassword", "Send Password") ?>

            <?php echo form_close(); ?>
            <div id="password_sent">
                <?php
                //jika email valid, tampilkan pesan sukses
                //jika email tidak valid, tampilkan 'email invalid'
                if ($valid == 1) {
                    //jika email tidak valid
                    echo '<font color="red">invalid e-mail or username</font>';
                } else if ($valid == 2) {
                    //jika email valid
                    echo '<font color="green">Your account\'s new password has been sent.<br> Please check your e-mail</font>';
                }
                ?>
            </div>
        </div>
    </div>
</div>